package com.ego;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by zhongbao.jing on 2018/11/07.
 */
public class Consumer {

    public static void main(String[] args) throws Exception {
    	ClassPathXmlApplicationContext context 
			= new ClassPathXmlApplicationContext("classpath:dubbo-consumer.xml");
		context.start();
		
		String username = "world";
		DemoService demoService = (DemoService) context.getBean("demoService");
		System.out.println(demoService.sayHello(username));
		System.in.read();
    }
}
